/*
 * @LastEditors: yuSeen
 * @LastEditTime: 2022-01-10 13:04:50
 */
import React, { memo } from "react";
import SvgIcon from "../SvgIcon/SvgIcon";

interface ILoadingProps {
  show: boolean;
}

const Loading: React.FC<ILoadingProps> = memo(({ show }) => {
  return (
    <>
      {show && (
        <div className="h-10 loading flex-c-c text-12 text-sub-text-color">
          <SvgIcon name="loading" size={15} className="mr-2" />
          载入中...
        </div>
      )}
    </>
  );
});

Loading.defaultProps = {
  show: false,
};

export default Loading;
